const express = require('express');
const cors = require('cors');
const app = express();
app.use(cors())

const conn = require('./db')
if(conn){
    console.log('连接成功')
}else{
    console.log('连接失败')
}

const routes = require('./routes')
app.use('/api/routes',routes)

app.listen(8000,()=>{
    console.log('启动成功,开始工作...')
})